home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-07 | 2.9 KB | 119 lines | [TEXT/CWIE] |
- //========================================================================================
- // Release Version: $ ODF 1 $
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
-
- //================================================================================
- #include "Talker.hpp"
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef CONTENT_H
- #include "Content.h"
- #endif
-
- #ifndef BINDING_K
- #include "Binding.k"
- #endif
-
- #ifndef FRAME_H
- #include "Frame.h"
- #endif
-
- #ifndef SELECTION_H
- #include "Selection.h"
- #endif
-
- // ----- Framework Layer -----
- #ifndef FWPRESEN_H
- #include "FWPresen.h" // FW_CPresentation
- #endif
-
- #ifndef FWUTIL_H
- #include "FWUtil.h" // FW_Beep()
- #endif
-
- #ifndef FWABOUT_H
- #include "FWAbout.h" //::FW_About()
- #endif
-
- // ----- OS Layer -----
- #ifndef FWCFMRES_H
- #include "FWCFMRes.h" // FW_CSharedLibraryResourceFile
- #endif
-
- #ifndef FWSUSINK_H
- #include "FWSUSink.h" // FW_CStorageUnitSink
- #endif
-
- #ifndef FWBARRAY_H
- #include "FWBArray.h" // FW_CByteArray
- #endif
-
- // ----- Foundation Layer -----
- #ifndef FWSTREAM_H
- #include <FWStream.h> // FW_InitializeArchiving
- #endif
-
- #ifndef FWMEMMGR_H
- #include "FWMemMgr.h" // FW_CMemoryManager
- #endif
-
- #ifndef FWSUSINK_H
- #include "FWSUSink.h" // FW_CStorageUnitSink
- #endif
-
- //==============================================================================
- #ifdef FW_BUILD_MAC
- #pragma segment Talker
- #endif
-
- FW_DEFINE_AUTO(CTalkerPart)
- //==============================================================================
- CTalkerPart::CTalkerPart(ODPart* odPart)
- : FW_CPart(odPart, FW_gInstance, kPartInfoID),
- fPresentation(NULL),
- fPartContent(NULL)
- {
- FW_END_CONSTRUCTOR
- }
-
- //--------------------------------------------------------------------------------
- CTalkerPart::~CTalkerPart()
- {
- FW_START_DESTRUCTOR
- }
-
- //--------------------------------------------------------------------------------
- void
- CTalkerPart::Initialize(Environment* ev) // Override
- {
- FW_CPart::Initialize(ev);
- CTalkerSelection* selection = FW_NEW(CTalkerSelection, (ev, fPartContent));
- const ODType kMainPresentation = "Apple:Presentation:Talker";
- const FW_Boolean kDefaultPresentation = true;
- fPresentation = RegisterPresentation(ev, kMainPresentation,
- kDefaultPresentation, selection);
- FW_CSharedLibraryResourceFile resFile(ev);
- GetMenuBar(ev)->InitializeFromResource(ev, kMenuBarID);
- }
-
- //--------------------------------------------------------------------------------
- FW_CFrame*
- CTalkerPart::NewFrame(Environment* ev, ODFrame* odFrame,
- FW_CPresentation* presentation, FW_Boolean fromStorage) // Override
- {
- FW_UNUSED(presentation);
- FW_UNUSED(fromStorage);
- return FW_NEW(CTalkerFrame, (ev, odFrame, presentation, fPartContent));
- }
-
- //------------------------------------------------------------------------------
- FW_CContent*
- CTalkerPart::NewPartContent(Environment* ev)
- {
- fPartContent = FW_NEW(CTalkerContent, (ev, this));
- return fPartContent;
- }
-